/** 获取屏幕高宽 */
export const useInnerSize = () => {
  const height = ref<number>(0);
  const width = ref<number>(0);

  onMounted(() => {
    getSize();
    window.addEventListener("resize", getSize);
  });

  const getSize = () => {
    height.value = window.innerHeight;
    width.value = window.innerWidth;
  };

  return {
    height,
    width,
  };
};
